package top.kaoshanji.r1ch04a;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * 代码清单-r1ch04a-96页a：以带注解的Java类提供的配置信息
 * @author kaoshanji
 * ^_^
 * create time 2025/5/4 19:25
 */
@Configuration
public class CarConfig {

    @Bean(name = "car")
    public Car buildCat() {
        Car car = new Car();
        car.setBrand("红旗CA72");
        car.setColor("火红色");
        car.setMaxSpeed(200);
        return car;
    }


}
